-- GENERATED SPELL FOR [Cabal Spellbinder] --


function spell0_18639(pUnit, Event) --@Brain Wash,n/a--
pUnit:FullCastSpellOnTarget(33502,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18639', 13000, 1)
end

function spell1_18639(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(33335,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18639', 3000, 1)
end

function spell2_18639(pUnit, Event) --@Spell Shock,n/a--
pUnit:FullCastSpellOnTarget(32691,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18639', 6259, 1)
end

function Sorts_18639(pUnit, Event)
local choix_sorts_18639 = math.random(0, 2)
if choix_sorts_18639 == 0 then
pUnit:RegisterEvent('spell0_18639', 1, 1)
end
if choix_sorts_18639 == 1 then
pUnit:RegisterEvent('spell1_18639', 1, 1)
end
if choix_sorts_18639 == 2 then
pUnit:RegisterEvent('spell2_18639', 1, 1)
end
end

function mob18639_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18639', math.random(1500, 3000), 1)
end

function mob18639_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18639_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18639_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18639, 1, 'mob18639_Action')
RegisterUnitEvent(18639, 2, 'mob18639_Leave')
RegisterUnitEvent(18639, 3, 'mob18639_Kill')
RegisterUnitEvent(18639, 4, 'mob18639_Die')
